package com.yl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yl.entity.Comment;
import com.yl.mapper.CommentMapper;
import com.yl.service.CommentService;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.List;

/**
 * @author yangl
 */
@DubboService
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {
    @Override
    public void saveEntity(Comment comment) {
        baseMapper.insert(comment);
    }

    @Override
    public List<Comment> commentList() {
        return baseMapper.selectList(new QueryWrapper<>());
    }
}
